<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <title>Document</title>
    <style>
        body{
            margin:0;
        }
        .all{
            /* background-color: yellow; */
            border:1px solid red;
            /* width: 750px; */
            /* height:500px;
            display: flex;
            justify-content: flex-start;
            align-items: flex-start; */
        }
        .link{
            position: absolute;
            left: 0;
            top:0;
            width: 100px;;
            height:200px;
            background-color: yellow;
        }
        .layer{
            position: absolute;
            left:0;
            top:0;
            width: 100%;
            height:500px;
            background-color: black;;
        }
    </style>
</head>
<body>
    <div class="all">
      
        <div class="link">
            <a href="https://www.baidu.com">百度</a>
        </div>
        <div class="layer">
            
            <input id="btn" type="button" value="ok" >
        </div>
    </div>
    <script>
        console.log(window.innerWidth);
        document.getElementById("btn").ontouchstart = function(){
            console.log("ok");
            document.querySelector(".layer").style.display = "none";
        };
    </script>
</body>
</html>